import { Tabs } from 'expo-router';
import React from 'react';
import { AntDesign, FontAwesome } from '@expo/vector-icons'  // 图标引入

export default function TabLayout() {

  return (
    <Tabs
    initialRouteName='Home'
      screenOptions={{
        tabBarActiveTintColor: '#5400dd',
        headerShown: false,
        tabBarStyle: { backgroundColor: 'white' }, // 设置背景颜色
      }}>
      <Tabs.Screen
        name="index"
        options={{
          title: '首页',
          tabBarIcon: ({ color, focused }) => (
            <FontAwesome name="home" size={24} color={color} />
          ),
        }}
      />
      <Tabs.Screen
        name="Classify"
        options={{
          title: '分类',
          tabBarIcon: ({ color, focused }) => (
            <AntDesign name="appstore-o" size={24} color={color} />
          ),
        }}
      />
      <Tabs.Screen
        name="Vip"
        options={{
          title: '会员',
          tabBarIcon: ({ color, focused }) => (
            <FontAwesome name="trophy" size={24} color={color} />
          ),
        }}
      />
      <Tabs.Screen
        name="Shopping"
        options={{
          title: '购物车',
          tabBarIcon: ({ color, focused }) => (
            <AntDesign name="shoppingcart" size={24} color={color} />
          ),
        }}
      />
      <Tabs.Screen
        name="My"
        options={{
          title: '我的',
          tabBarIcon: ({ color, focused }) => (
            <FontAwesome name="user" size={24} color={color} />
          ),
        }}
      />
    </Tabs>
  );
}
